<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	function fn(){
		let a = 100;
		return {
			getA(){
				return a;
			},
			setA(m){
				a=m;
			}
		}
	}
	const obj = fn();
	console.log(obj.getA());// 100;
	obj.setA(99);
	console.log(obj.getA());// 99
	
</script>
</html>